#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pii pair<int,int>
#define pb push_back
#define vec vector<int>
#define y1 y_____hahahaha_____1

using namespace std;

typedef long long ll;
typedef double db;
typedef unsigned long long ull;
typedef long double ldb;

int read(){int x = 0,sgn = 1;char ch = getchar();for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;for(;isdigit(ch);ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ 48); return x * sgn;}

const int N = 4e5+10;

int n;
int stk1[N],top1,stk2[N],top2,ans;
char s[N];

int C(int x,int y){
	top1 = top2 = 0;
	while(x > 0) stk1[++top1] = x % 3,x /= 3;
	while(y > 0) stk2[++top2] = y % 3,y /= 3;
	int res = 1;
	for(int i = 1;i <= top2;i++){
		if(stk1[i] < stk2[i]) return 0;
		if(stk2[i] == 0) res = res;
		if(stk2[i] == 1) res = res * stk1[i] % 3;
	}return res;
}

int main(){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in; scanf("%s",s);
	for(int i = 0;i < n;i++){
		int x = 0; if(s[i] == 'B') x = 1; if(s[i] == 'R') x = 2;
		ans = (ans + C(n - 1,i) * x) % 3 + 3;
	}
	if(!(n & 1)) ans = (3 - ans % 3) % 3;
	ans = (ans + 3) % 3; puts(ans == 0 ? "W" : ans == 1 ? "B" : "R");
	return 0;
}
